package com.loc;

import android.content.Context;
import com.sangfor.kevinsawicki.http.HttpRequest;
import java.util.HashMap;
import java.util.Map;

/* compiled from: BaseAAIDRequest.java */
/* loaded from: classes2.dex */
public class af extends r {
    public Context k;

    public af(Context context) {
        this.k = context;
        a(5000);
        b(5000);
    }

    @Override // com.loc.bt
    public final Map<String, String> a() {
        HashMap hashMap = new HashMap();
        hashMap.put("Content-Type", HttpRequest.CONTENT_TYPE_JSON);
        hashMap.put(HttpRequest.HEADER_ACCEPT_ENCODING, HttpRequest.ENCODING_GZIP);
        hashMap.put("User-Agent", "AMAP SDK Android core 4.3.9.1");
        hashMap.put("platinfo", String.format("platform=Android&sdkversion=%s&product=%s", "4.3.9.1", "core"));
        hashMap.put("logversion", "2.1");
        return hashMap;
    }

    @Override // com.loc.bt
    public final String b() {
        return q.a().b() ? "https://restapi.amap.com/rest/aaid/get" : "http://restapi.amap.com/rest/aaid/get";
    }

    @Override // com.loc.bt
    public final String c_() {
        return "core";
    }

    @Override // com.loc.bt
    public final Map<String, String> e() {
        HashMap hashMap = new HashMap();
        hashMap.put("key", l.f(this.k));
        String a = n.a();
        String a2 = n.a(this.k, a, x.b(hashMap));
        hashMap.put("ts", a);
        hashMap.put("scode", a2);
        return hashMap;
    }
}
